package org.wattdepot.cli.command;

import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import org.wattdepot.cli.CommandLineInterface;

/**
 * Test that checks for valid output within the FueltypeCommand class.
 * 
 * @author Anthony Xu & John Mack
 * 
 */
public class TestFueltype {
  /**
   * Test to see if fueltype class displays correct output fuels for source and subsources.
   * 
   * @throws Exception NotAuthorizedException, ResourceNotFoundException, BadXmlException,
   * MiscClientException.
   */
  @Test
  public void testingFueltypes() throws Exception {
    CommandLineInterface cli = new CommandLineInterface();
    List<String> commands = new ArrayList<String>();
    commands.add("fueltypes");
    commands.add("SIM_IPP");

    String fuelType = new FueltypesCommand().doCommand(cli, commands);
    assertEquals("correct fuel output", "coal : SIM_AES" + "\n" + "waste : SIM_HPOWER" + "\n"
        + "LSFO : SIM_KALAELOA" + "\n", fuelType);
  }

}
